<script>
    //定义对象
    let user = {name:"zhangsan",age:20}

    //传统从对象里面获取值
    let name1 = user.name;
    let age1 = user.age;
    console.log(name1,age1) 

    //es6
    let {name,age} = user //注意: 结构的变量必须是user中的属性
    console.log(name+":"+age)
</script>